package com.yuexunit.operationman.nbsy.module.nurse.ui;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;


import com.yuexunit.operationman.nbsy.R;
import com.yuexunit.operationman.nbsy.base.ExitApplication;
import com.yuexunit.operationman.nbsy.config.AppConfig;

import org.kymjs.kjframe.KJActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by chenss on 2017/7/7 0007.
 */

public class Act_Ops_Adress extends KJActivity {
    @Bind(R.id.tv_patient_name)
    TextView tvPatientName;
    @Bind(R.id.tv_patient_sex)
    TextView tvPatientSex;
    @Bind(R.id.tv_patient_visitno)
    TextView tvPatientVisitno;
    @Bind(R.id.tv_patient_disease)
    TextView tvPatientDisease;
    @Bind(R.id.pic)
    ImageView pic;

    @Override
    public void setRootView() {
        setContentView(R.layout.act_ops_adress);
        ButterKnife.bind(this);
        ExitApplication.getInstance().addActivity(this);
    }

    @Override
    public void initData() {
        super.initData();
        setTitle();
    }

    private void setTitle()
    {
        tvPatientName.setText(AppConfig.NURSEBEAN.getObject().getNursing().getPatientName());
        if(AppConfig.NURSEBEAN.getObject().getNursing().getPatientSex().equals("1")) {
            tvPatientSex.setText("男");
        }else if(AppConfig.NURSEBEAN.getObject().getNursing().getPatientSex().equals("2"))
        {
            tvPatientSex.setText("女");
        }
        else {
            tvPatientSex.setText("不详");
        }
        tvPatientVisitno.setText("住院号" + AppConfig.NURSEBEAN.getObject().getNursing().getInHospitalNo());
        tvPatientDisease.setText(AppConfig.NURSEBEAN.getObject().getNursing().getOperationName());
    }


    @OnClick({R.id.titlebar_docadvice_img_back, R.id.rb_front, R.id.rb_reverse})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.titlebar_docadvice_img_back:
                finish();
                break;
            case R.id.rb_front:
                break;
            case R.id.rb_reverse:
                break;
        }
    }
}
